<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 300px;
            padding: .5em;
            line-height: 1.5;
            background: beige;
            background-size: auto 3em;
            background-origin: content-box;
            background-image: linear-gradient(rgba(0,0,0,.2) 50%,
            transparent 0);
        }
    </style>
</head>
<body>
    <div>
        padding: .5em;
        line-height: 1.5;
        background: beige;
        background-size: auto 3em;
        background-origin: content-box;
        background-image: linear-gradient(rgba(0,0,0,.2) 50%,
        transparent 0);
    </div>
</body>
</html>